Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix: #290 run apt only on required packages #291

Closed
wants to merge 2 commits into from

Conversation

RecursiveFunctions
Copy link

fixes a case #290 where the user has a package that triggers this error:
E: The repository '...' does not have a Release file
when running sudo apt-get upgrade, by upgrading / installing only what pikaraoke needs

Error condition will output to console, but script will continue to install dependencies.
if [ $? -ne 0 ]; then echo "ERROR: 'apt-get update' failed with error code: $?"; exit 1; fi

echo
sudo apt update --allow-releaseinfo-change || true
Copy link
Owner

@vicwomg vicwomg Dec 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will disable the error checking on apt update. If apt fails to update, then the installs may result in outdated and or incompatible packages.

I feel like if there's an error running apt update, it should be addressed by the end user rather than ignoring it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added it back in a little further down in the next commit
+14

Altogether, it does check for updates, but if there is an error with apt update, it will output the error message to the user so they can address it. In either case it will still attempt to install pikaraoke

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you force "|| true" though, wont the $? return 0? If that's the case then line 14 will never throw the error.

On the other point, suppose a bad repository is accessed before the valid pikaraoke dependent-repositories are. The script would error AND the install would occur with out of date repositories. I don't see a way to handle this cleanly.

@vicwomg
Copy link
Owner

vicwomg commented Dec 26, 2024

pikaraoke is no longer installed in this way

@vicwomg vicwomg closed this Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants